<%@page language="java" pageEncoding="GBK" import="entity.*,biz.*,biz.impl.*"%>>
<%
request.setCharacterEncoding("GBK");
String userName=request.getParameter("userName");
String userPass=request.getParameter("userPass");
String head=request.getParameter("head");
int gender=Integer.parseInt(request.getParameter("gender"));
UserBiz userBiz=new UserBizImpl();
User user=new User();
user.setUserName(userName);
user.setUserPass(userPass);
user.setHead(head);
user.setGender(gender);
int num=userBiz.addUser(user);
if(num==1){
    response.sendRedirect("../index.jsp");
}else{
    response.sendRedirect("../reg.jsp");
}
%>